package com.zjw.demo.vertx.starter.template.service;

import com.zjw.demo.vertx.starter.annotation.NonNull;
import com.zjw.demo.vertx.starter.annotation.core.Inject;
import com.zjw.demo.vertx.starter.annotation.core.Service;
import com.zjw.demo.vertx.starter.plugin.impl.aop.EnableAop;
import com.zjw.demo.vertx.starter.plugin.impl.aop.Invoke;
import com.zjw.demo.vertx.starter.service.IService;
import com.zjw.demo.vertx.starter.smi.IFutureTask;
import com.zjw.demo.vertx.starter.template.bean.User;
import com.zjw.demo.vertx.starter.template.sqlmapping.DemoSqlMapping;
import io.vertx.core.Vertx;
import io.vertx.ext.web.RoutingContext;

import java.util.List;

@Service
public class MysqlService implements IService {

  @NonNull
  @Inject
  public DemoSqlMapping demoSqlMapping;

  @Override
  public void onStart(Vertx vertx) {

  }

  public void queryUser(String username, IFutureTask<List<User>> call) {
    demoSqlMapping.queryUserById(call, username);
  }
}
